package cn.wolfcode.luowowo.query;

import lombok.Getter;
import lombok.Setter;

import java.util.HashMap;
import java.util.Map;

/**
 * 游记查询条件
 */
@Getter
@Setter
public class TypeMap {
    //初始化
    public  static final Map<Integer,TypeMap> DATE_MAP  = new HashMap<>();//旅游天数
    public  static final Map<Integer,TypeMap> PERCOST_MAP  = new HashMap<>();//人均花费
    //静态初始化,类加载的时候创建
    static{
        //出行天数
        DATE_MAP.put(1,new TypeMap(0,3));
        DATE_MAP.put(2,new TypeMap(4,7));
        DATE_MAP.put(3,new TypeMap(8,14));
        DATE_MAP.put(4,new TypeMap(15,Integer.MAX_VALUE));

        //人均花费
        PERCOST_MAP.put(1,new TypeMap(1,999));
        PERCOST_MAP.put(2,new TypeMap(1000,5999));
        PERCOST_MAP.put(3,new TypeMap(6000,19999));
        PERCOST_MAP.put(4,new TypeMap(20000,Integer.MAX_VALUE));
    }

    private int min;
    private int max;
    public TypeMap(int min ,int max){
        this.min = min;
        this.max = max;
    }

}
